<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var b = 16;
        switch (b){
            case 10:
                alert ("上小学")
                break;
            case 15:
                alert("上中学")
                break;
            case 20:
                alert("上大学")
                break;
            case 16:
            case 17:
            case 18:
                alert("上高中")
        }

    </script>
</body>
</html>